﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ToDoList
{
   public class InputRequire
    {
        public static string InputString(string require)
        {
            Console.WriteLine(require);
            return Console.ReadLine();
             
        }
        public static int InputInt(string require)
        {
            while (true) {
                try
                {
                    Console.WriteLine(require);
                    int result = Convert.ToInt32(Console.ReadLine());
                    return result;
                }
                catch {
                    Console.WriteLine("You input the number exception:");
                    Console.WriteLine("Input again:");
                }
 
            }
        }
        public static DateTime InputDateTime(string require) {
             Console.WriteLine(require);
            return Convert.ToDateTime(Console.ReadLine());
        }
    }
}
